home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 42 / Amiga Format AFCD42 (Issue 126, Aug 1999).iso / -serious- / emulation / c64gfx / man / ppmtofli.man < prev    next >
Text File  |  1999-05-14  |  6KB  |  118 lines

  1.  
  2.  
  3. ppmtofli(1)                      C64Gfx                       ppmtofli(1)
  4.  
  5.  
  6. NAME
  7.      ppmtofli - convert a portable pixmap file to a C64 FLI picture file
  8.  
  9. SYNOPSIS
  10.      ppmtofli [-vmbswd<val> -l<val>] [<ppmfile> [<flifile>]]
  11.  
  12. DESCRIPTION
  13.      Reads  a  portable  pixmap  file and produces an C64 FLI picture file.
  14.      Due  to  the  limitations  in  fli  picture  format  and  C64 graphics
  15.      capabilities,  ppmtofli  cannot  always  do  a  one-to-one translation
  16.      between  the  images.   When  you  draw  a picture, you should use the
  17.      palette  distributed  in  this package.  However, it is not absolutely
  18.      necessary.   Ppmtofli  will  always  do  its  best  to select the most
  19.      suitable color, but the selection may be other than you wanted.
  20.  
  21.      First  ppmtofli  will select the colors for the color memory.  It will
  22.      pick  the  most  used  color  in the corresponding character position.
  23.      Here  only  those  four-pixel groups that use more than two colors are
  24.      counted.   Then the conversion begins and the program will use the FLI
  25.      colors  if needed.  If it runs out of possible color, if will take the
  26.      best  approximation, but does not normally reorder or merge the colors
  27.      already in use.
  28.  
  29. OPTIONS
  30.      d = do a simple dithering in the color conversion
  31.      l = set the importance of the luminance value of the color (default 7)
  32.      w = use the 12 leftmost pixels too (will use approximation)
  33.      s = shift the picture before converting
  34.      b = use the background colors in the conversion
  35.      m = merge FLI colors if it means less errors
  36.      v = verbose, output extra information about the process
  37.  
  38.      Options  can  be  anywhere in the command line and they can grouped or
  39.      given separately. Filenames are optional.
  40.  
  41.     example: ppmtofli -w magic.ppm -mb magic.fli -d15
  42.  
  43.      If  you  have  a  picture with colors that do not match C64 palette in
  44.      large  areas,  you can try the simple dither option,  -d followed by a
  45.      number.   In this mode ppmtofli will propagate half of the color error
  46.      to  the  next  cell in that line and the other half to the cell in the
  47.      next line.  The color error is the difference between the picked color
  48.      and  the wanted color and before propagating the error, the value will
  49.      be divided with the dither value given in the command line.  Sometimes
  50.      a  dither  value around 2 is better than none, sometimes the other way
  51.      around and sometimes -d1 is optimal.  The only way to know for sure is
  52.      to  try  several  dither divider values until you get the best result.
  53.      If  you  use  the  dither  option,  it must be the last option in that
  54.      argument.
  55.  
  56.     example: ppmtofli -d2 heaven.ppm heaven.fli
  57.  
  58.      Generally it seems that the dither value 1 gives the best results, but
  59.      for drawn pictures no dithering suits better.
  60.  
  61.      The luminance inportance also has a great impact on the results.  With
  62.      bright  pictures  you  get  'really'  good results if you increase the
  63.      luminance importance. However, if you want 'realistic' colors, use the
  64.      default setting (7) or less.
  65.  
  66.      There  is  a  little  'feature'  in  the FLI mode:  the three leftmost
  67.      character positions always show bit pairs 11 as brown and pairs 01 and
  68.      10 as light gray.  Because of this, ppmtofli will not normally convert
  69.      the leftmost 12 pixels at all, leaving them black.  With option -w you
  70.      can  enable the use of that area too and the program will do it's best
  71.      to convert any colors in this area to the previously mentioned colors.
  72.      You  can  move  the picture 12 pixels to the right with the -s option.
  73.      It  is not wise to use the -w option then. However, it will cause just
  74.      a bit slower conversion.
  75.  
  76.      Of  course there are cases when you need three different colors in one
  77.      four-pixel  group,  but  the  color  memory  color is not one of them.
  78.      Approximating  the  color  is  not always the best solution.  With the
  79.      merge  option  (-m)  you  can enable the merging of the FLI colors, if
  80.      they  are closer to each other than the overflowing color is to any of
  81.      the colors available. Currently the merge is not very optimal, it does
  82.      not know about all the merge possibilities.
  83.  
  84.     example: FLI colors are 0x0d and 0x03 and we want to plot 0x09.
  85.          Converter will merge 0x0d and 0x03 and put 0x09 to the
  86.          other fli color.
  87.  
  88.      If  you  want that the converter will use the background colors in the
  89.      conversion  too,  use the -b option.  In this mode ppmtofli will first
  90.      select  the colors for the color memory and then background colors for
  91.      each scan line.  This will free more FLI-colors and the conversion may
  92.      be perfect.  You must take into account that it might be impossible to
  93.      do  any  further edits to the picture, because FLI editors in C64 will
  94.      handle the background color edits independently from the other colors,
  95.      and  on almost all cases the approximation and merge will lead to much
  96.      better pictures.  In fact,  this option/mode is quite useless, but you
  97.      could take advantage of it when designing color bars. Some fli viewers
  98.      also don't even show the background colors.
  99.  
  100. SEE ALSO
  101.      FLI.doc
  102.      ppmtokoala, koalatoppm, ppmtobfli, c64toppm, c64toilbm, ppmtofli,
  103.      flitoppm, ppmtoffli, fflitoppm
  104.  
  105. AUTHOR
  106.      Copyright © 1991-95 by Pasi 'Albert' Ojala.
  107.  
  108.      Permission   to  use,  copy  and  distribute  this  software  and  its
  109.      documentation  for  any  purpose  and  without  fee is hereby granted,
  110.      provided that the above copyright notice appear in all copies and that
  111.      both  that  copyright  notice  and  this  permission  notice appear in
  112.      supporting  documentation.   This software is provided "as is" without
  113.      express or implied warranty.
  114.  
  115.      I still retain rights to the sources and changed source code
  116.      may not be distributed in any form.  However, you are allowed
  117.      to use the ideas and methods found from the source codes.
  118.